/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package exercises.day01.pt1;

import java.util.Scanner;

/**
 * MyFirstJava
 *
 * @author (jaice)
 * @version 0.1 (may 28, 2012)
 * 
 *b. Write an application that reads values representing a time duration in hours, 
 *minutes, and seconds, and then print the equivalent total in seconds.  
 */
public class TimeToSeconds {

    public static void main(String args[]) {
        //declare variable
        int hours = 0;
        int minutes = 0;
        int seconds = 0;
        int total = 0;


        //declare scanner
        Scanner sc = new Scanner(System.in);

        //print input hours
        System.out.println("enter hours");

        //get input hours
        hours = sc.nextInt();

        //print input minutes
        System.out.println("enter minutes");

        //get input minutes
        minutes = sc.nextInt();

        //print input seconds
        System.out.println("enter seconds");


        //get input seconds
        seconds = sc.nextInt();

        total = hours * 60 * 60 + minutes * 60 + seconds;
        //print equivalent to seconds 
        System.out.println("\n\nEquivalent to seconds is   " + total);





    }
}
